<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>url解析</title>
  <style>
    .topDiv {
      width: 500px;
      /* height: 110px; */
      border: 2px solid yellow;
      background-color: aqua;
      /* overflow: hidden; */
    }

    .topDiv:after {
      display: inline;
      clear: both;
      content: "";
      visibility: hidden;
      height: 0;
    }

    /* .div1 {
      zoom: 1;
    } */

    .floatDiv {
      width: 100px;
      height: 100px;
      border: 2px dotted red;
      color: red;
      margin: 4px;
      float: left;
      background-color: blueviolet;
    }

    .textDiv {
      color: blue;
      border: 2px solid blue;
      float: right;
      background-color: brown;
      /* clear: left; */
    }

    /* .clear {
      clear: both;
    } */

    .bottomDiv {
      width: 500px;
      height: 100px;
      margin: 5px 0;
      border: 2px dotted black;
    }
  </style>
</head>

<body>
  <div class="topDiv">
    <div class="floatDiv">float left</div>
    <div class="textDiv">float right</div>
    <div class="clear"></div>
  </div>
  <!-- <div class="bottomDiv">底部</div> -->
</body>
<script>

</script>

</html>